<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
<!--v-bind:
    作用: 动态的设置html标签属性
    语法: v-bind:属性名="表达式"（常见为url形式保存着的资源）
    写法:
         (1) v-bind:src=""  ——————标准写法
         (2) :src           ——————语法糖
    注意:
        (1)插值表达式里不能直接写{{}} 这样不对: v-bind:src="{{imgUrl}}" 、 v-bind:src= {{imgUrl}}
        (2)vue的赋值语句基本都要在""内部写，即使""里面是变量也要这样，这和传统的JAVA代码有很大的区别

     -->
    <img v-bind:src="imgUrl" v-bind:title="msg" alt="">
    <img :src="imgUrl" :title="msg" alt="">
      <br>
      <button @click="count === 0 ? count = 3 : count-- ">上一页</button>
      <img src="./imgs/11-00.gif" v-if="count === 0">
      <img src="imgs/11-01.gif" v-else-if="count === 1 ">
      <img src="imgs/11-02.gif" v-else-if="count===2">
      <img src="imgs/11-03.gif" v-else>
      <button @click="count === 3 ? count = 0 : count++ ">下一页</button>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        imgUrl: './imgs/10-02.png',
        msg: 'hello 波仔',
          count: 0,
      }
    })

  </script>
</body>
</html>